package com.zhentao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhentao.dto.FaceUserInfo;
import com.zhentao.pojo.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 人脸用户映射器
 */
@Mapper
public interface FaceUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据分组ID获取用户人脸信息
     * @param groupId 分组ID
     * @return 人脸用户信息列表
     */
    @Select("SELECT face_id as faceId, name, face_feature as faceFeature FROM sys_user WHERE group_id = #{groupId} AND face_feature IS NOT NULL AND status = 1")
    List<FaceUserInfo> getUserFaceInfoByGroupId(Integer groupId);
}
